import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
import Supplier from "../views/Supplier.vue";
import Mine from "../views/Mine.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    component: () => import('../views/Index.vue'),
    children: [
      {
        path: '/',
        name: 'home',
        component: Home,
      },
      {
        path: '/supplier',
        name: 'supplier',
        component: Supplier,
      },
      {
        path: '/mine',
        name: 'mine',
        component: Mine,
      },
    ],
  },
  {
    path: "/about",
    name: "about",
    component: () => import("../views/About.vue")
  },
  {
    path: "/supplydetail",
    name: "supplydetail",
    component: () => import("../views/Supplydetail.vue")
  },
  {
    path: "/supplygoods",
    name: "supplygoods",
    component: () => import("../views/Supplygoods.vue")
  },
  {
    path: "/login",
    name: "login",
    component: () => import("../views/Login.vue")
  },
  {
    path: "/registe",
    name: "registe",
    component: () => import("../views/Registe.vue")
  },
  {
    path: "/minedetail",
    name: "minedetail",
    component: () => import("../views/Minedetail.vue")
  },
  {
    path: "/minesupplier",
    name: "minesupplier",
    component: () => import("../views/Minesupplier.vue")
  },
  {
    path: "/orderenquiry",
    name: "orderenquiry",
    component: () => import("../views/Orderenquiry.vue")
  },
  {
    path: "/orderpurchase",
    name: "orderpurchase",
    component: () => import("../views/Orderpurchase.vue")
  },
  {
    path: "/ordertests",
    name: "ordertests",
    component: () => import("../views/Ordertests.vue")
  },
  {
    path: "/detailenquiry",
    name: "detailenquiry",
    component: () => import("../views/Detailenquiry.vue")
  },
  {
    path: "/detailpurchase",
    name: "detailpurchase",
    component: () => import("../views/Detailpurchase.vue")
  },
  {
    path: "/detailtests",
    name: "detailtests",
    component: () => import("../views/Detailtests.vue")
  }
];

const router = new VueRouter({
  routes
});

export default router;
